/* test_cross.cpp */

#include <iostream>
#include <string>

#include <dodo_plot/dodo_plot.h>

//#include <dodo_plot/projector/linear_2d_projector.h>

#include <dodo_plot/widget/cross.h>
//#include <dodo_plot/widget/blank.h>
//#include <dodo_plot/widget/label.h>
//#include <dodo_plot/widget/axis.h>
//#include <dodo_plot/widget/plot.h>


using namespace std;
using namespace dodo_plot;
using namespace dodo_plot::color_name;

int main(int argc, char *argv[])
{
//	Color c_old_paper(0.9, 0.85, 0.5);
//	Font font_symbol("webdings");
//
//	Canvas canvas(600, 800);
//	
//	Blank background(800, 600, c_old_paper);
//	Blank blank(600, 400, WHITE, false, BLACK);
//	Blank plot_border(450, 350, TRANSPARENT, false, BLACK);
//	Cross cross(300, 300);
//	Axis axis_b(0.5, 1.4, 300, BOTTOM);
//	Axis axis_t(0, 0, 300, TOP);
//	Axis axis_l(0, 0, 300, LEFT);
//	Axis axis_r(0, 0, 300, RIGHT);
//	Label ll("haha", 16, LEFT);
//	Label lr("abg", 30, RIGHT);
//	Label lc("This is a long sentence.", 24);
//	
//	ll.set_border_color(BLUE);
//	ll.set_font(FONT_HELVETICA);
//	lr.set_fill_color(Color(0.5, 0.0, 0.9, 0.75));
//	lr.set_font(font_symbol);
//	lc.set_border_color(GREEN);
//	lc.set_fill_color(WHITE);
//
//	double x[] = { 1, 2, 4, 5, 7, 8 };
//	double y[] = { 6, 4, 7, 2, 10, 4 };
//	vector<double> x_v(x, x + 6);
//	vector<double> y_v(y, y + 6);
//	
//	Linear_2d_Projector<double, double> 
//			x_y_range(
//				0, 10,
//				0, 12
//			    );
//
//	Plot<double, double, Linear_2d_Projector<double, double> >
//			plot(
//				x_v, y_v,
//				x_y_range
//			    );
//	
//
//
//	Picture p_cross_axis = axis_t & (axis_l | cross | axis_r) & axis_b;
//	Picture final = combi(p_cross_axis, ll, TOP);
//	final = combi(final, lc, CENTER);
//	final = combi(final, lr, BOTTOM | SIZE_LOCK, 0, -50);
//	final = frame(combi(blank, final), 500, 250);
//	final = combi(background, final);
//	final = combi(final, frame(plot, 450, 350));
//	final = combi(final, plot_border);
//
//	canvas.resize_as(final);
//	canvas.draw(final);
//	canvas.write_png("axis.png");
//
//
	Cross c1(300, 200, 5);
	Cross c2(100, 100, 2);
	Cross c3(200, 400, 10);

	Canvas canvas(800, 600);
	canvas.draw(c1 | c2 | c3);
	canvas.write_png("cross1.png");

	canvas.draw((c1 | c2) & c3);
	canvas.write_png("cross2.png");

	return 0;
}

